package com.ruoyi.project.modules.businessUsage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.modules.businessUsage.mapper.BusinessUsageMapper;
import com.ruoyi.project.modules.businessUsage.domain.BusinessUsage;
import com.ruoyi.project.modules.businessUsage.service.IBusinessUsageService;
import com.ruoyi.common.core.text.Convert;

/**
 * 业务需求用况关系Service业务层处理
 * 
 * @author smallrain
 * @date 2021-11-06
 */
@Service
public class BusinessUsageServiceImpl implements IBusinessUsageService 
{
    @Autowired
    private BusinessUsageMapper businessUsageMapper;

    /**
     * 查询业务需求用况关系
     * 
     * @param id 业务需求用况关系主键
     * @return 业务需求用况关系
     */
    @Override
    public BusinessUsage selectBusinessUsageById(Long id)
    {
        return businessUsageMapper.selectBusinessUsageById(id);
    }

    /**
     * 查询业务需求用况关系列表
     * 
     * @param businessUsage 业务需求用况关系
     * @return 业务需求用况关系
     */
    @Override
    public List<BusinessUsage> selectBusinessUsageList(BusinessUsage businessUsage)
    {
        return businessUsageMapper.selectBusinessUsageList(businessUsage);
    }

    /**
     * 新增业务需求用况关系
     * 
     * @param businessUsage 业务需求用况关系
     * @return 结果
     */
    @Override
    public int insertBusinessUsage(BusinessUsage businessUsage)
    {
        return businessUsageMapper.insertBusinessUsage(businessUsage);
    }

    /**
     * 修改业务需求用况关系
     * 
     * @param businessUsage 业务需求用况关系
     * @return 结果
     */
    @Override
    public int updateBusinessUsage(BusinessUsage businessUsage)
    {
        return businessUsageMapper.updateBusinessUsage(businessUsage);
    }

    /**
     * 批量删除业务需求用况关系
     * 
     * @param ids 需要删除的业务需求用况关系主键
     * @return 结果
     */
    @Override
    public int deleteBusinessUsageByIds(String ids)
    {
        return businessUsageMapper.deleteBusinessUsageByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除业务需求用况关系信息
     * 
     * @param id 业务需求用况关系主键
     * @return 结果
     */
    @Override
    public int deleteBusinessUsageById(Long id)
    {
        return businessUsageMapper.deleteBusinessUsageById(id);
    }
}
